package com.fenqiyong.www.fragment;


import android.content.Intent;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.fenqiyong.www.R;
import com.fenqiyong.www.action.FragmentMinePresent;
import com.tougc.bean.beans.MineSdkBean;
import com.tougc.bean.beans.UserBean;
import com.fenqiyong.www.action.FragmentMineContract;

import javax.inject.Inject;

import ren.nearby.http.base.BaseLazyLoadFragment;
import ren.nearby.http.base.IPresenter;
import ren.nearby.http.utils.setbar.StatusBarUtils;
import ren.nearby.http.utils.util.PreferencesUtils;

public class Stated extends BaseLazyLoadFragment implements FragmentMineContract.View, View.OnClickListener {


    @Inject
    FragmentMineContract.Action action;



    @Nullable
    @Override
    public FragmentActivity getContext() {
        return getActivity();
    }


    @Override
    public void onFragmentFirstVisible() {
        action.takeView(this);

    }

    @Override
    public void showSuccess() {

    }


    @Override
    public void onFragmentResume() {

    }





    @Override
    public void setMineSdkBean(MineSdkBean bean) {

    }

    @Override
    public void start(UserBean user) {
    }

    @Override
    public void setPresenter(FragmentMinePresent presenter) {

    }

    boolean esys = true;

    LinearLayout ll_bar;
    TextView tv;

    @Override
    protected void initView(View view) {
        action.takeView(this);
        ll_bar = view.findViewById(R.id.ll_bar);
        ll_bar.setBackgroundResource(R.color.white);
        ll_bar.setVisibility(View.VISIBLE);
        //获取到状态栏的高度
        int statusHeight = StatusBarUtils.getStatusBarHeight(getActivity());
        //动态的设置隐藏布局的高度
        LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) ll_bar.getLayoutParams();
        params.height = statusHeight;
//        Logger.e("statusHeight = " + statusHeight);
        ll_bar.setLayoutParams(params);

    }

    @Override
    public void onClick(View v) {
        int it = v.getId();
        switch (it) {

        }
    }

    @Override
    protected BaseLazyLoadFragment getFragment() {
        return this;
    }

    @Override
    public IPresenter getPresenter() {
        return null;
    }

    @Override
    protected int getLayoutRes() {
        return R.layout.fragment_mine;
    }


}
